(ns db-explorer.server
  (:require [compojure.core :refer :all]
            [db-explorer.ui :as ui]
            [ring.middleware.reload :refer [wrap-reload]]
            [ring.middleware.params :refer [wrap-params]]
            [ring.middleware.resource :refer [wrap-resource]]))

(defroutes app
  (GET "/" [] ui/index-page)
  (GET "/hello" [] "hello")
  )

(def handler
  (-> app
      (wrap-resource "public")
      (wrap-resource "")
      wrap-params))

(defonce dev-app (wrap-reload handler))

(defn foo
  "I don't do a whole lot."
  [x]
  (println x "Hello, World!"))
